package com.gusha.model;

import java.io.Serializable;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Entity
@Table(name="sys_products")
@NamedQuery(name="SysProducts.findAll", query="SELECT s FROM SysProducts s")
@DynamicInsert
@Data
@NoArgsConstructor
@AllArgsConstructor
public class SysProducts implements Serializable{
	 private static final long serialVersionUID = 1L;
	 
	 
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)  
	private BigInteger id;
	
	@Column(name="products_name")
	private String productsName;
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="add_time")
	private Date addTime;
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="update_time")
	private Date updateTime;
	
    @ManyToOne(fetch=FetchType.LAZY)
   	@NotFound(action=NotFoundAction.IGNORE)
   	@JoinColumn(name="user_id")
	private User user;
    
    @Column(name="price")
	private BigDecimal price;//价格
    
    @Column(name="products_img")
	private String productsImg;//产品图片
    
    @Column(name="products_video")
	private String productsVideo;//产品视频
    
    @Column(name="is_delete")
	private BigInteger isDelete;//是否删除
    
    @Column(name="is_check")
	private BigInteger isCheck;//是否审核
    
    @Column(name="add_name")
	private String addName;//添加时间
    
    @Column(name="click_mun")
    private Long clickMun;//点击量
    
    @Column(name="products_type")
    private BigInteger productsType;//产品类型

    @Column(name="pro_content")
    private String proContent;//产品介绍
    
    @Column(name="storage_mode")
    private BigInteger storageMode;//储藏方式
    
    @Column(name="pro_package")
    private BigInteger proPackage;//包装
    
    @Column(name="pro_colour")
    private String proColour;//产品颜色
    
    @Column(name="merchant_name")
    private String merchantName;//商户名称
    
    @Column(name="businessman")
    private String businessman;//商户人
    
    @Column(name="store_address")
    private String storeAddress;//商店地址
    
    @Column(name="pro_contact")
    private String proContact;//联系方式
    
    @Column(name="pro_volume")
    private BigInteger proVolume;//成交量
    
    
	public BigInteger getStorageMode() {
		return storageMode;
	}

	public void setStorageMode(BigInteger storageMode) {
		this.storageMode = storageMode;
	}

	public BigInteger getProPackage() {
		return proPackage;
	}

	public void setProPackage(BigInteger proPackage) {
		this.proPackage = proPackage;
	}

	public String getProColour() {
		return proColour;
	}

	public void setProColour(String proColour) {
		this.proColour = proColour;
	}

	public String getMerchantName() {
		return merchantName;
	}

	public void setMerchantName(String merchantName) {
		this.merchantName = merchantName;
	}

	public String getBusinessman() {
		return businessman;
	}

	public void setBusinessman(String businessman) {
		this.businessman = businessman;
	}

	public String getStoreAddress() {
		return storeAddress;
	}

	public void setStoreAddress(String storeAddress) {
		this.storeAddress = storeAddress;
	}

	public String getProContact() {
		return proContact;
	}

	public void setProContact(String proContact) {
		this.proContact = proContact;
	}

	public BigInteger getProVolume() {
		return proVolume;
	}

	public void setProVolume(BigInteger proVolume) {
		this.proVolume = proVolume;
	}

	public String getProContent() {
		return proContent;
	}

	public void setProContent(String proContent) {
		this.proContent = proContent;
	}

	public BigInteger getProductsType() {
		return productsType;
	}

	public void setProductsType(BigInteger productsType) {
		this.productsType = productsType;
	}

	public Long getClickMun() {
		return clickMun;
	}

	public void setClickMun(Long clickMun) {
		this.clickMun = clickMun;
	}

	public BigInteger getId() {
		return id;
	}

	public void setId(BigInteger id) {
		this.id = id;
	}

	public String getProductsName() {
		return productsName;
	}

	public void setProductsName(String productsName) {
		this.productsName = productsName;
	}

	public Date getAddTime() {
		return addTime;
	}

	public void setAddTime(Date addTime) {
		this.addTime = addTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public BigDecimal getPrice() {
		return price;
	}

	public void setPrice(BigDecimal price) {
		this.price = price;
	}

	public String getProductsImg() {
		return productsImg;
	}

	public void setProductsImg(String productsImg) {
		this.productsImg = productsImg;
	}

	public String getProductsVideo() {
		return productsVideo;
	}

	public void setProductsVideo(String productsVideo) {
		this.productsVideo = productsVideo;
	}

	public BigInteger getIsDelete() {
		return isDelete;
	}

	public void setIsDelete(BigInteger isDelete) {
		this.isDelete = isDelete;
	}

	public BigInteger getIsCheck() {
		return isCheck;
	}

	public void setIsCheck(BigInteger isCheck) {
		this.isCheck = isCheck;
	}

	public String getAddName() {
		return addName;
	}

	public void setAddName(String addName) {
		this.addName = addName;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}
    
    
}
